﻿<%@ Page Title="" Language="C#" MasterPageFile="~/default-interno.master" AutoEventWireup="true" CodeBehind="usuario.aspx.cs" Inherits="CeA.Reports.Atendimento.Web.admin.usuario" %>
<%@ Register Assembly="CeA.Reports.Atendimento.Web" Namespace="CeA.Reports.Atendimento.Web.ServerControls" TagPrefix="cea" %>
<%@ Register src="../inc/WebControls/MenuInterno.ascx" tagname="MenuInterno" tagprefix="menu" %>
<%@ Register src="../inc/WebControls/MessageBox.ascx" tagname="MessageBox" tagprefix="msgbox" %>

<asp:Content ID="head" ContentPlaceHolderID="head" runat="server">
  <link rel="Stylesheet" href="/css/popup.css" type="text/css" />
</asp:Content>
<asp:Content ID="body" ContentPlaceHolderID="FilterContentPlaceholder" runat="server">
  <h2>Dados do Usuário</h2>
  
  <table cellpadding="1" cellspacing="1">
    <tr>
      <td style="width:80px;"><asp:Label runat="server" AssociatedControlID="txtLogin" text="Nome" /></td>
      <td><asp:TextBox ID="txtNome" runat="server" CssClass="text-field" Width="400px" MaxLength="100"/></td>
    </tr>
    <tr>
      <td><asp:Label runat="server" AssociatedControlID="txtEmail" text="Email" /></td>
      <td><asp:TextBox ID="txtEmail" runat="server" CssClass="text-field" Width="230px" MaxLength="50"/></td>
    </tr>
    <tr>
      <td><asp:Label runat="server" AssociatedControlID="txtLogin" text="Login" /></td>
      <td><asp:TextBox ID="txtLogin" runat="server" CssClass="text-field" Width="230px" MaxLength="32"/></td>
    </tr>
  </table>
  
  <span class="break">
    <asp:Button ID="cmdPesquisar" runat="server" CssClass="form-buttom" Text="Pesquisar" />
    <asp:Button ID="cmdLimpar"    runat="server" CssClass="form-buttom" Text="Limpar" />
  </span>
  
  <br />

  <!-- DataList Header Hack -->
  <div id="gridHeader" runat="server" visible="false" style="margin:0 1px 0 1px;">
    <table cellpadding="0" cellspacing="0" border="0" style="width:100%">
      <tr>
        <td colspan="8">
          <h2>Lista de Usuários</h2>
        </td>
      </tr>
      <tr class="th">
        <td style="width: 021px">&nbsp </td>
        <td style="width: 220px">Nome  </td>
        <td style="width: 160px">Login </td>
        <td style="width: 120px">Bloqueado </td>
        <td style="width:  auto">Email </td>
      </tr>
    </table>
  </div>
  
  <div id="gridScroll" runat="server" visible="false" style="overflow-x:auto; height:150px">
    <asp:DataList ID="dataList" runat="server" Width="100%" CellSpacing="1" CellPadding="0">
      <ItemStyle CssClass="cor-1" />
      <AlternatingItemStyle CssClass="cor-2" />
      <ItemTemplate>
        <table cellpadding="0" cellspacing="0" style="width:100%;table-layout:fixed;" border="0">
          <tr class="list-row">
            <td style="width: 021px">
              <cea:GroupRadioButton ID="rbtItem" runat="server" GroupName="rfsid" Text='<%#DataBinder.Eval(Container.DataItem, "Id")%>' />
            </td>
            <td style="width: 220px">
              <asp:LinkButton id="sel" runat="server" CommandName="VIEW" CommandArgument='<%#DataBinder.Eval(Container.DataItem, "Id")%>' 
                CssClass="link-buttom" ToolTip="Clique aqui para visualizar." Text='<%#DataBinder.Eval(Container.DataItem, "Detalhe.Nome")%>' />
            </td>
            <td style="width: 160px"><%#DataBinder.Eval(Container.DataItem, "Login")%></td>
            <td style="width: 120px"><%#DataBinder.Eval(Container.DataItem, "ContaBloqueada")%></td>
            <td style="width:  auto"><%#DataBinder.Eval(Container.DataItem, "Detalhe.Email")%></td>
          </tr>
        </table>
      </ItemTemplate>
    </asp:DataList>
  </div>

  <span id="editControls" runat="server" class="break" visible="false">
    <asp:Button ID="cmdEditar"  runat="server" CssClass="form-buttom" Text="Editar" />
    <asp:Button ID="cmdExcluir" runat="server" CssClass="form-buttom" Text="Excluir" onclick="cmdExcluir_Click"/>
  </span>
  
  <msgbox:MessageBox ID="MessageBox" runat="server" />
</asp:Content>

<asp:Content ID="menu" ContentPlaceHolderID="MenuInternoPlaceholder" runat="server">
  <menu:MenuInterno ID="menuInterno" runat="server" Titulo="Ações" />
</asp:Content>
